package com.sskj.mine.verify;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.bean.UserData;
import com.sskj.lib.http.HttpJsonCallBack;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.presenter.BasePresenter;


/**
 * @author Hey
 * Create at  2019/05/01
 */
class VerifyFirstPresenter extends BasePresenter<VerifyFirstActivity> {

    public void verifyFirst(String realName, String idCard,String type) {
        OkGo.<HttpData<Object>>post(HttpConfig.BASE_URL + HttpConfig.Verify_FISRT)
                .params("realname", realName)
                .params("card_num", idCard)
                .params("type", type)
                .execute(new JsonCallBack<HttpData<Object>>() {
                    @Override
                    public void onSuccess(Response<HttpData<Object>> response) {
                        HttpData<Object> httpData = response.body();
                        if (httpData.getStatus() == HttpConfig.OK) {
                            mView.verifyFirstSuccess();
                        }
                    }
                });
    }
}
